package com.yic.module.wms.controller.admin.receiveapply.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static com.yic.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 领料申请单 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class ReceiveApplyBaseVO {

    @Schema(description = "申请单号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "申请单号不能为空")
    private String code;

    @Schema(description = "工厂", requiredMode = Schema.RequiredMode.REQUIRED, example = "25998")
    @NotNull(message = "工厂不能为空")
    private Long factoryId;

    @Schema(description = "生产车间", requiredMode = Schema.RequiredMode.REQUIRED, example = "3128")
    @NotNull(message = "生产车间不能为空")
    private Long workshopId;

    @Schema(description = "工作中心", requiredMode = Schema.RequiredMode.REQUIRED, example = "24655")
    @NotNull(message = "工作中心不能为空")
    private Long centerId;

    @Schema(description = "生产计划", requiredMode = Schema.RequiredMode.REQUIRED, example = "20929")
    @NotNull(message = "生产计划不能为空")
    private Long planId;

    @Schema(description = "生产工单", requiredMode = Schema.RequiredMode.REQUIRED, example = "22697")
    @NotNull(message = "生产工单不能为空")
    private Long moId;

    @Schema(description = "产品信息", requiredMode = Schema.RequiredMode.REQUIRED, example = "4790")
    @NotNull(message = "产品信息不能为空")
    private Long itemId;

    @Schema(description = "产品仓储信息", requiredMode = Schema.RequiredMode.REQUIRED, example = "18434")
    @NotNull(message = "产品仓储信息不能为空")
    private Long itemWarehouseId;

    @Schema(description = "配送位置", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "配送位置不能为空")
    private String address;

    @Schema(description = "需求时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "需求时间不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime demandTime;

    @Schema(description = "领料方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "领料方式不能为空")
    private Integer applyType;

    @Schema(description = "领料套数", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "领料套数不能为空")
    private Integer applyCover;

    @Schema(description = "领料数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "领料数量不能为空")
    private BigDecimal applyAmount;

    @Schema(description = "实际数量")
    private BigDecimal realAmount;

    @Schema(description = "单位", example = "20441")
    private Long unitId;

    @Schema(description = "仓库", example = "15402")
    private Long warehouseId;

    @Schema(description = "库区", example = "20199")
    private Long areaId;

    @Schema(description = "库位", example = "32446")
    private Long locationId;

    @Schema(description = "制单人", example = "23389")
    private Long userId;

    @Schema(description = "制单部门", example = "1286")
    private Long deptId;

    @Schema(description = "处理人", example = "4167")
    private Long handleUserId;

    @Schema(description = "处理时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime handleTime;

    @Schema(description = "发料人", example = "24179")
    private Long sendUserId;

    @Schema(description = "发料时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime sendTime;

    @Schema(description = "确认人", example = "18829")
    private String confirmUserId;

    @Schema(description = "确认时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime confirmTime;

    @Schema(description = "状态", example = "1")
    private Integer status;

    @Schema(description = "批次号")
    private String batchNo;

    @Schema(description = "备注", example = "你说的对")
    private String remark;

    @Schema(description = "说明", example = "你说的对")
    private String description;

}
